package com.example.movies;

import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;

import com.example.movies.Util.Base_Util;

public class MainActivity extends AppCompatActivity {

    private EditText ed_text;
    private Button btn_play;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
        //设置沉浸模式
//        Base_Util.Setimmersion(getWindow());
//        ActionBar actionBar = getSupportActionBar();
//        actionBar.hide();

    }


    private void initView() {
        ed_text = (EditText) findViewById(R.id.ed_text);
        btn_play = (Button) findViewById(R.id.btn_play);

        btn_play.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                String str = ed_text.getText().toString().trim();
                Intent intent=new Intent(MainActivity.this,movies.class);
                intent.putExtra("name",str);
                startActivity(intent);
            }
        });
    }

}